<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>客户详细信息</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="${ctx}/rs/js/jquery.validate.min.js"></script>
<script src="${ctx}/rs/js/jquery.form.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" class="form-horizontal"  enctype="multipart/form-data">
     
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">账户</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="emailurl" name="emailurl" value="${user.emailurl}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">${user.showType}</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="showValue" name="showValue" value="${user.showValue}"/>
        </div>
      </div>
     
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">客户名称</label>
        <div class="col-sm-6 wid2">
			 <input type="hidden" id="id" name="id" value="${user.id}"/>
			 <input type="text" class="form-control " id="username" name="username" value="${user.username}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">所属行业</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="industry" name="industry" value="${user.industry}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">客户描述</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="describe" name="describe" value="${user.describe}"/>
        </div>
      </div>
      
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">营业执照</label>
        
        <c:if test="${user.businessli == '' || user.businessli == null}">
	       	<div class="col-sm-6 wid2" style="padding-top: 7px;">
	       		 无图片
	       	</div>
        </c:if>
        <c:if test="${user.businessli != '' && user.businessli != null}">
	        <div class="col-sm-6 wid2" id="imgdiv">
	       		<img id="banimg1" class="banimg1" width="100" height="100" src="${user.businessli}"/>
	         	 <input type="button" value="查看大图" style="vertical-align: bottom;" onclick="divshow(banimg1)"/> <!---->
	        </div>
        </c:if>
        </div>
    
      
      <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">资质证明</label>
        
         <c:if test="${user.license == '' || user.license == null}">
	        <div class="col-sm-6 wid2" style="padding-top: 7px;">
	       		 无图片
	       	</div>
        </c:if>
        <c:if test="${user.license != '' && user.license != null}">
         <div class="col-sm-6 wid2" >
       		<img class="banimg" width="100" height="100" src="${user.license}"/>
         </div>
        </c:if>
       
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">联系人</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="linkname" name="linkname" value="${user.linkname}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">联系电话</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="telphone" name="telphone" value="${user.telphone}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">QQ</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="qqstr" name="qqstr" value="${user.qqstr}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">固定电话</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="fixphone" name="fixphone" value="${user.fixphone}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">地址</label>
        <div class="col-sm-6 wid2">
          <input type="text" class="form-control " id="address" name="address" value="${user.address}"/>
        </div>
      </div>
      
       <div class="form-group">
        <label for="name" class="col-sm-2 control-label item wid1">备注</label>
        <div class="col-sm-6 wid2">
        	<textarea class="form-control reason" rows = 3 id="remark" name="remark">${user.remark}</textarea>
        </div>
      </div>
      
      <div id="showdiv"  style="display:none;position: absolute;z-index: 1000;top: 50%;left: 50%;width: 520px;height: 400px;margin: -200px 0 0 -260px;">
		<div id="picmain">
    		<div id="logpic"><span style= "cursor:hand;"  onclick="nonediv()">&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">[关闭窗口]</font></span></div>
    		<div id="pics"><img id="myimage" src=""   width="520px" height="400px" style="border-width:1px; border-color:#006633; border-style:solid;" ></div>
    	</div>
	</div>
</form>


<script type="text/javascript" src="${ctx}/rs/js/bootstrapQ.min.js"></script>
<script src="${ctx}/rs/js/messages_zh.min.js"></script>

<script>


function divshow(obj){
	     document.getElementById("myimage").src=obj.src; 
	   	 var divpic = document.getElementById("showdiv");
	   	 var ch = $("#showdiv").height();
			var cw = $("#showdiv").width();
	       var x =300;
			var y = 450;
			var l,t;
			if(x>cw/2){
				//靠近右边
				l = x-300;
			}else{
				l = x;
			}
			if(y>ch/2){
				//靠近下边
				t = y-200;
			}else{
				t = y;
			}
			
			/* $("#showdiv").css({
				top:t,
				left:l
			}); */		
	       divpic.style.display="block";
	      
}
function nonediv(){
	   	 var divpic = document.getElementById("showdiv");
	       divpic.style.display="none";
}

</script>
</body>
</html>